﻿using System.Net.Http;

namespace Puppy.Scheduler.Common
{
    public class DefaultPuppyHttpClientFactory : IPuppyHttpClientFactory
    {
        private readonly IHttpClientFactory _httpClientFactory;

        public DefaultPuppyHttpClientFactory(IHttpClientFactory httpClientFactory)
        {
            _httpClientFactory = httpClientFactory;
        }

        public HttpClient Create()
        {
            return _httpClientFactory.CreateClient();
        }

        public HttpClient Create(string name)
        {
            return _httpClientFactory.CreateClient(name);
        }
    }
}
